use clap::Parser;
use common_base::config::placement_center_config::init_placement_center_conf_by_path;
use common_base::config::placement_center_config::placement_center_conf;
use common_base::log::placement_center::init_placement_center_log;
use log::info;

pub const DEFAULT_PLACEMENT_CENTER_CONFIG: &str = "config/placement-center.toml";

#[derive(Parser)]
#[command(author="ws", version="0.0.1", about="doc", long_about = None)]
#[command(next_line_help = true)]
struct ArgsParams {
    #[arg(short, long,default_value_t = String::from(DEFAULT_PLACEMENT_CENTER_CONFIG))]
    config: String,
}

fn main() {
    let args = ArgsParams::parse();
    // 初始化配置文件
    init_placement_center_conf_by_path(&args.config);
    // 初始化日志
    init_placement_center_log();
    let conf = placement_center_conf();
    // 记录日志
    info!("{:?}", conf);
}
